package com.tdkj.model.bbs;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * EjfReply entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "ejf_reply", catalog = "west")
public class EjfReply implements java.io.Serializable {

	// Fields

	private Integer replyId;
	private EjfTopic ejfTopic;
	private String userId;
	private String remoteIp;
	private String title;
	private String content;
	private Short attaches;
	private String isHidePost;
	private String isBest;
	private String state;
	private Timestamp createTime;
	private Timestamp updateTime;

	// Constructors

	/** default constructor */
	public EjfReply() {
	}

	/** minimal constructor */
	public EjfReply(EjfTopic ejfTopic, String userId, String content, Timestamp updateTime) {
		this.ejfTopic = ejfTopic;
		this.userId = userId;
		this.content = content;
		this.updateTime = updateTime;
	}

	/** full constructor */
	public EjfReply(EjfTopic ejfTopic, String userId, String remoteIp, String title, String content, Short attaches, String isHidePost, String isBest, String state, Timestamp createTime, Timestamp updateTime) {
		this.ejfTopic = ejfTopic;
		this.userId = userId;
		this.remoteIp = remoteIp;
		this.title = title;
		this.content = content;
		this.attaches = attaches;
		this.isHidePost = isHidePost;
		this.isBest = isBest;
		this.state = state;
		this.createTime = createTime;
		this.updateTime = updateTime;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "replyID", unique = true, nullable = false)
	public Integer getReplyId() {
		return this.replyId;
	}

	public void setReplyId(Integer replyId) {
		this.replyId = replyId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "topicID", nullable = false)
	public EjfTopic getEjfTopic() {
		return this.ejfTopic;
	}

	public void setEjfTopic(EjfTopic ejfTopic) {
		this.ejfTopic = ejfTopic;
	}

	@Column(name = "userID", nullable = false, length = 15)
	public String getUserId() {
		return this.userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}

	@Column(name = "remoteIP", length = 25)
	public String getRemoteIp() {
		return this.remoteIp;
	}

	public void setRemoteIp(String remoteIp) {
		this.remoteIp = remoteIp;
	}

	@Column(name = "title", length = 100)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content", nullable = false, length = 16777215)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "attaches")
	public Short getAttaches() {
		return this.attaches;
	}

	public void setAttaches(Short attaches) {
		this.attaches = attaches;
	}

	@Column(name = "isHidePost", length = 1)
	public String getIsHidePost() {
		return this.isHidePost;
	}

	public void setIsHidePost(String isHidePost) {
		this.isHidePost = isHidePost;
	}

	@Column(name = "isBest", length = 1)
	public String getIsBest() {
		return this.isBest;
	}

	public void setIsBest(String isBest) {
		this.isBest = isBest;
	}

	@Column(name = "state", length = 1)
	public String getState() {
		return this.state;
	}

	public void setState(String state) {
		this.state = state;
	}

	@Column(name = "createTime", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "updateTime", nullable = false, length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

}